package com.hex.ds.hdtp.core.app.license.truelicense.service;

import de.schlichtherle.license.LicenseManager;
import de.schlichtherle.license.LicenseParam;

/**
 * @Package com.hex.ds.hdtp.core.app.license.truelicense
 * @ClassName LicenseManagerHolder
 * @Description DCL创建de.schlichtherle.license.LicenseManager类的单例
 * @Author Yin.Yang
 * @Date 2024/3/27 15:29
 * @Version v1.0
 **/
public class LicenseManagerHolder {

    private static volatile LicenseManager LICENSE_MANAGER;

    public static LicenseManager getInstance(LicenseParam param){
        if(LICENSE_MANAGER == null){
            synchronized (LicenseManagerHolder.class){
                if(LICENSE_MANAGER == null){
                    LICENSE_MANAGER = new CustomLicenseManager(param);
                }
            }
        }

        return LICENSE_MANAGER;
    }

}

